diff -upr ucblogo-6.0.orig/coms.c ucblogo-6.0/coms.c
--- ucblogo-6.0.orig/coms.c	2008-08-23 22:51:14.000000000 +0300
+++ ucblogo-6.0/coms.c	2015-09-09 19:48:45.375415764 +0300
@@ -24,10 +24,11 @@
 extern int check_wx_stop(int force_yield);
 #endif
 
+#include <math.h>
+
 #define WANT_EVAL_REGS 1
 #include "logo.h"
 #include "globals.h"
-#include <math.h>
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
diff -upr ucblogo-6.0.orig/graphics.c ucblogo-6.0/graphics.c
--- ucblogo-6.0.orig/graphics.c	2008-09-03 20:58:13.000000000 +0300
+++ ucblogo-6.0/graphics.c	2015-09-09 19:49:04.289294029 +0300
@@ -22,11 +22,12 @@
 #ifdef WIN32
 #include <windows.h>
 #endif /* WIN32 */
- 
+
+#include <math.h>
+
 #define WANT_EVAL_REGS 1
 #include "logo.h"
 /*   #include "globals.h"   has been moved further down */
-#include <math.h>
 
 #ifdef HAVE_WX
 #include "wxGraphics.h"
